package com.xiaowu.mapper;

import com.xiaowu.pojo.Blind;
import com.xiaowu.pojo.Blindgister;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;
@Mapper
public interface BlindMapper {

    //查询
    @Select("select id,userId,passWord,registerDate from blindpersonlogin")
    List<Blind> list();

    //删除
    @Delete("delete from blindpersonlogin  where id=#{id}")
    void delete(Integer id);

    //添加
    @Insert("insert into blindpersonlogin(userId, passWord, registerDate, " +
            "loginStatus, channelName, isNeedHelp, onLineStatus, gestures_one_ai_question, gestures_two_ai_question, gestures_three_ai_question, gestures_call_number) " +
            "values (#{userId},#{passWord},#{registerDate},#{loginStatus},#{channelName},#{isNeedHelp},#{onLineStatus},#{gestures_one_ai_question}" +
            ",#{gestures_two_ai_question},#{gestures_three_ai_question},#{gestures_call_number})")
    void insert(Blindgister blind);

    //分页查询
    @Select("select id,userId,passWord,registerDate from blindpersonlogin")
    public List<Blind> listByPage();

    List<Blind> listByPages(String userId, String onLineStatus);
}
